-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 08 Kwi 2014, 17:14
-- Server version: 5.6.16
-- PHP Version: 5.5.9

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `ankiety`
--

-- --------------------------------------------------------

--
-- Struktura tabeli dla tabeli `answers`
--

CREATE TABLE IF NOT EXISTS `answers` (
  `ID_ANSWER` int(11) NOT NULL,
  `ANSWER` varchar(100) NOT NULL,
  `ID_QUESTION` int(11) NOT NULL,
  `ANSWERS_COUNT` int(11) NOT NULL,
  PRIMARY KEY (`ID_ANSWER`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Zrzut danych tabeli `answers`
--

INSERT INTO `answers` (`ID_ANSWER`, `ANSWER`, `ID_QUESTION`, `ANSWERS_COUNT`) VALUES
(1, 'Audi', 1, 0),
(2, 'BMW', 1, 0),
(3, 'Opel', 1, 0),
(4, 'Pilka nozna', 2, 0),
(5, 'Siatkówka', 2, 0);

-- --------------------------------------------------------

--
-- Struktura tabeli dla tabeli `questions`
--

CREATE TABLE IF NOT EXISTS `questions` (
  `ID_QUESTION` int(11) NOT NULL,
  `QUESTION` varchar(150) NOT NULL,
  `DATE` date NOT NULL,
  `ANSWERS_COUNT` int(11) NOT NULL,
  `ID_USER` int(11) NOT NULL,
  `MULTIPLE_CHOOSE` tinyint(1) NOT NULL,
  PRIMARY KEY (`ID_QUESTION`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Zrzut danych tabeli `questions`
--

INSERT INTO `questions` (`ID_QUESTION`, `QUESTION`, `DATE`, `ANSWERS_COUNT`, `ID_USER`, `MULTIPLE_CHOOSE`) VALUES
(1, 'Ulubiona marka samochodu?', '2014-04-08', 0, 1, 0),
(2, 'Ulubiony sport?', '2014-04-08', 0, 1, 0);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
